#ifndef __ECHO_HPP__
#define __ECHO_HPP__
#include "ThreadPool.hpp"
#include "TcpConnection.hpp"
#include "Server.hpp"

namespace wd
{
class Echo
{
public:
    Echo(int,int,const string &,unsigned short);
    void start();
    
private:
    void onConnction(TcpConnectionPtr);
    void onMessage(TcpConnectionPtr);
    void onClosed(TcpConnectionPtr);

private:
    ThreadPool _threadpool;
    Server _server;
};

}//end of namespace


#endif // __ECHO_HPP__

